package com.springboot.demo.design.pattern.observer;

import java.util.Observable;
import java.util.Observer;

/**
 * 订单观察者
 *
 * @author supu
 * @date 2019-07-17 13:48
 **/
public class OrderWatcher implements Observer {
    @Override
    public void update(Observable o, Object arg) {
        OrderInfo orderInfo = (OrderInfo) arg;

        System.out.println("订单号:" + orderInfo.getOrderNo() + ", 状态：" + orderInfo.getOrderStatus() + " 的订单更新了");
    }
}
